package com.renjibo.teawithmilkgoods.activitys;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;

import com.renjibo.teawithmilkgoods.R;

public class LoginActivity extends AppCompatActivity implements View.OnClickListener {

    private EditText login_editText_phone;
    private EditText login_editText_password;
    private TextView login_textView_register;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_login);
        initView();

    }
    public void initView(){
        ImageView login_imageView_over=  (ImageView)findViewById(R.id.login_imageView_over);
        login_textView_register = (TextView) findViewById(R.id.login_textView_register);
        login_editText_phone = (EditText) findViewById(R.id.login_editText_phone);
        login_editText_password = (EditText) findViewById(R.id.login_editText_password);
        login_imageView_over.setOnClickListener(this);
        login_textView_register.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.login_imageView_over://关闭当前页面
                finish();
                break;
            case R.id.login_textView_register://跳到注册页面
                startActivity(new Intent(LoginActivity.this,RegisterActivity.class));
                break;
        }
    }
}
